package n2;

/**
 * @author wxc
 * @date 2021年10月07日 20:05
 */
public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        MyThread thread = new MyThread();
        thread.start();
        Thread.sleep(3000);
        thread.test();
    }
}

class MyThread extends Thread {
    @Override
    public void run() {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("=========");
    }

    public void test() {
        System.out.println("test");
    }
}